Create localizable text

If you expand the Language switch node in the project explorer, you will see that it already contains several sub-nodes.

You can define the languages of your application texts in the Configuration node. You can see the languages in the table editor in the workspace by double-clicking on the Languagesnode. Here you can add new languages or remove existing languages. The application frame of your project is already configured for German and English.

All other sub-nodes are text groups that contain the actual texts or further sub-groups with texts. As the application frame already contains some texts, most text groups are not empty.

All texts that you create in the project itself are created in the "User texts" text group.

  • To create a localizable text:

  1. Create a new text group:

    1. Expand the project explorer node Language switch.

    2. Select the User texts node contained therein.

    3. Right-click and select New from the context menu.

    A new text group with the name Text group1 has been created within the User text group. The parameters of the new text group definition you have just created are displayed in the Property pages window. In this case, there is only one parameter: Name. The table editor for the new text group also opens.

  2. Specify a different name for the new text group in the Name parameter:

    1. In the Property pages window, enter a new name for the text group in the Name parameter, e.g. MachinePage.Tip: In many cases, it makes sense to group text groups according to the pages in which the texts are to be used.

    2. Click once outside the Property pages window, e.g. on the workspace.

    The name of the text group is customised in the project explorer.

  3. Create a text definition within the new text group. Right-click on the table editor and select New in the context menu that opens.

    A new text definition has been created and appears as a line in the table editor.

  4. Specify the name of the text definition and the texts for the respective language.

    1. Enter the name WelcomeText in the Name column in the table editor.

    2. Enter the name Welcome in the column German (Germany) (1031).

    3. Enter the name Welcome in the English (United States) (1033)column.

    You have created a text group and a localizable text within this text group. This contains a text for German and one for English. You can now bind the localizable text to a control so that the control displays the text in the selected language.